import React from "react";

export type CurrentKey =
  | "intelligentAuestionAnsweringNumber" // 智能问答问数
  | "anomalyWarning" // 异常预警
  | "operationParameterOptimization" // 操作参数优化
  | "operationPathFindingOptimization" // 操作路径寻优化
  | undefined;

export interface IBigScreenContext {
  currentKey: CurrentKey;
  setCurrentKey: (currentKey: CurrentKey) => void;
  clientWidth: number;
  iframeRef: React.RefObject<HTMLIFrameElement> | undefined;
  postMessageApi: any;
}

export const BigScreenContext = React.createContext<IBigScreenContext>({
  currentKey: "intelligentAuestionAnsweringNumber",
  setCurrentKey: () => {},
  clientWidth: 0,
  iframeRef: undefined,
  postMessageApi: undefined,
});
